import Login from "../pages/Login/Login";
import Home from "../pages/Home/Home";
import Operate from "../pages/Operate/Operate"
import Property from "../pages/Property/Property"
import Visual from "../pages/Visual/Visual"
import Set from "../pages/Set/Set"
import ComprehensiveSituational from "../pages/Comprehensive_situational/Comprehensive_situational";
import TenantInformationManagement from "../pages/Tenant_information_management/Tenant_information_management";
import TenantManagement from "../pages/Tenant_management/Tenant_management";
import OperationOverview from "../pages/Operation_overview/Operation_overview";
import ProjectManagement from "../pages/Project_management/Project_management";
import AlarmRules from "../pages/Alarm_rules/Alarm_rules";
import ResourceManagement from "../pages/Resource_management/Resource_management";
import RoleManagement from "../pages/Role_management/Role_management";
import OrganizationManagement from "../pages/Organization_management/Organization_management";
import UserManagement from "../pages/User_management/User_management";
import OperationLog from "../pages/Operation_log/Operation_log";
import PropertyOverview from "../pages/Property_overview/Property_overview";
// import VisitorManagement from "../pages/Visitor_management/Visitor_management";
import VisitorInformationRegistration from "../pages/Visitor_information_registration/Visitor_information_registration";
import VisitorEntryRecord from "../pages/Visitor_entry_record/Visitor_entry_record";
import IntelligentEntrance from "../pages/Intelligent_entrance/Intelligent_entrance";
import RoadManagement from "../pages/Road_management/Road_management";
import WatermeterManagement from "../pages/Watermeter_management/Watermeter_management";
import ChargingpileManagement from "../pages/Chargingpile_management/Chargingpile_management";
import ParkCockpit from "../pages/Park_cockpit/Park_cockpit";
import SecurityMonitoring from "../pages/Security_monitoring/Security_monitoring";
import IntelligentElevator from "../pages/Intelligent_elevator/Intelligent_elevator";
import IntelligentFire from "../pages/Intelligent_fire/Intelligent_fire";
import ParkEquipment from "../pages/Park_equipment/Park_equipment";
import IntelligentLighting from "../pages/Intelligent_lighting/Intelligent_lighting";
import SourceNetwork from "../pages/Source_network/Source_network";
import VehicleBill from "../pages/Vehicle_bill/Vehicle_bill";
import TenantBillingManagement from "../pages/Tenant_billing_management/Tenant_billing_management";
import ArticlePublishingManagement from "../pages/Article_publishing_management/Article_publishing_management";
import ContentCommentManagement from "../pages/Content_comment_management/Content_comment_management";
import ContractSigningManagement from "../pages/Contract_signing_management/Contract_signing_management";
import CustomerInformationManagement from "../pages/Customer_information_management/Customer_information_management";
import BuildingInformationManagement from "../pages/Building_information_management/Building_information_management";
import BuildingAdd from "../pages/Building_information_management/BuildingAdd/BuildingAdd";
import BuildingSpace from "../pages/Building_information_management/BuildingSpace/BuildingSpace";
import BuildingBasic from "../pages/Building_information_management/BuildingSpace/BuildingBasic/BuildingBasic";
import BuildingRoom from "../pages/Building_information_management/BuildingSpace/BuildingRoom/BuildingRoom";
import CommonResourceManagement from "../pages/Common_resource_management/Common_resource_management";
import CommomAdd from "../pages/Common_resource_management/CommomAdd/CommomAdd";
import CommomDetails from "../pages/Common_resource_management/CommomDetails/CommomDetails";
import EnergyConsumptionAnalysis from "../pages/Energy_consumption_analysis/Energy_consumption_analysis";
import VehicleInformationManagement from "../pages/Vehicle_information_management/Vehicle_information_management";
import VehicleEntryRecord from "../pages/Vehicle_entry_record/Vehicle_entry_record";
import ParkInvestmentAnalysis from "../pages/Park_investment_analysis/Park_investment_analysis";
import { useRoutes, Navigate } from "react-router-dom";
import SignAdd from "../pages/Contract_signing_management/SignAdd/SignAdd"


import ArticleAdd from '../pages/Article_add/Article_add'

const Routes = () => {
  return useRoutes([
    {
      path: "/",
      element: <Navigate to="/Login" />,
    },
    {
      path: "/Login",
      element: <Login />,
    },
    {
      path: "/Home",
      element: <Home />,
      children: [
        {
          index: 'index',
          element: <ComprehensiveSituational />,
        },
        {
          path: "ComprehensiveSituational",
          element: <ComprehensiveSituational />,
        },
        {
          path: "Operate",
          element: <Operate />,
          children: [
            {
              index: 'index',
              element: <OperationOverview />,
            },
            {
              path: "OperationOverview",
              element: <OperationOverview />,
            },
            {
              path: "ArticlePublishingManagement",
              element: <ArticlePublishingManagement />,
            },
            {
              path: "ContentCommentManagement",
              element: <ContentCommentManagement />,
            },
            {
              path: "ContractSigningManagement",
              element: <ContractSigningManagement />,
              children: [
                {
                  path: "SignAdd",
                  element: <SignAdd />
                }
              ]
            },
            {
              path: "CustomerInformationManagement",
              element: <CustomerInformationManagement />,
            },
            {
              path: "TenantInformationManagement",
              element: <TenantInformationManagement />,
            },
            {
              path: "TenantManagement",
              element: <TenantManagement />,
            },
            {
              path: "BuildingInformationManagement",
              element: <BuildingInformationManagement />,
              children: [
                {
                  path: "BuildingSpace",
                  element: <BuildingSpace />,
                  children: [
                    {
                      index: "index",
                      element: <BuildingBasic />
                    },
                    {
                      path: "BuildingRoom",
                      element: <BuildingRoom />
                    }
                  ]
                },
                {
                  path: "BuildingAdd",
                  element: <BuildingAdd />,
                }
              ]
            },
            {
              path: "CommonResourceManagement",
              element: <CommonResourceManagement />,
              children: [
                {
                  path: "CommomAdd",
                  element: <CommomAdd />
                },
                {
                  path: "CommomDetails",
                  element: <CommomDetails />
                }
              ]
            },
            {
              path: "Energy_consumption_analysis",
              element: <EnergyConsumptionAnalysis />
            },
            {
              path: "VehicleBill",
              element: <VehicleBill />,
            },
            {
              path: "TenantBillingManagement",
              element: <TenantBillingManagement />,
            },
            {
              path: "ArticleAdd",
              element: <ArticleAdd />,
            }
          ]
        },
        {
          path: "Property",
          element: <Property />,
          children: [
            {
              index: 'index',
              element: <PropertyOverview />,
            },
            {
              path: "PropertyOverview",
              element: <PropertyOverview />,
            },
            {
              path: "VisitorInformationRegistration",
              element: <VisitorInformationRegistration />,
            },
            {
              path: "VisitorEntryRecord",
              element: <VisitorEntryRecord />,
            },
            {
              path: "VehicleInformationManagement",
              element: <VehicleInformationManagement />,
            },
            {
              path: "VehicleEntryRecord",
              element: <VehicleEntryRecord />,
            },
            {
              path: "IntelligentEntrance",
              element: <IntelligentEntrance />,
            },
            {
              path: "RoadManagement",
              element: <RoadManagement />,
            },
            {
              path: "WatermeterManagement",
              element: <WatermeterManagement />,
            },
            {
              path: "ChargingpileManagement",
              element: <ChargingpileManagement />,
            },
            {
              path: "SecurityMonitoring",
              element: <SecurityMonitoring />,
            },
            {
              path: "IntelligentElevator",
              element: <IntelligentElevator />,
            },
            {
              path: "IntelligentFire",
              element: <IntelligentFire />,
            },
            {
              path: "IntelligentLighting",
              element: <IntelligentLighting />,
            },
            {
              path: "SourceNetwork",
              element: <SourceNetwork />,
            },
          ]
        },
        {
          path: "Visual",
          element: <Visual />,
          children: [
            {
              index: 'index',
              element: <ParkCockpit />,
            },
            {
              path: "ParkCockpit",
              element: <ParkCockpit />,
            },
            {
              path: "ParkInvestmentAnalysis",
              element: <ParkInvestmentAnalysis />,
            },
            {
              path: "ParkEquipment",
              element: <ParkEquipment />,
            },
            {
              path: "EnergyConsumptionAnalysis",
              element: <EnergyConsumptionAnalysis />,
            },
          ]
        },
        {
          path: "Set",
          element: <Set />,
          children: [
            {
              index: 'index',
              element: <ProjectManagement />,
            },
            {
              path: "ProjectManagement",
              element: <ProjectManagement />,
            },
            {
              path: "AlarmRules",
              element: <AlarmRules />,
            },
            {
              path: "RoleManagement",
              element: <RoleManagement />,
            },
            {
              path: "OrganizationManagement",
              element: <OrganizationManagement />,
            },
            {
              path: "UserManagement",
              element: <UserManagement />,
            },
            {
              path: "OperationLog",
              element: <OperationLog />,
            },
            {
              path: "ResourceManagement",
              element: <ResourceManagement />,
            },
          ]
        },
      ]
    },
  ]);
};
export default Routes;
